<template>
  <NuxtLayout name="custom">
    <hr />
    <div>
      <!-- 组件可以自动导入 -->
      <!-- <TheHeader :menuData="state.indexData" @scrollTo="scrollTo" /> -->

      <div><NuxtLink to="/index">首页</NuxtLink></div>
      <div><NuxtLink to="/aboutus">关于我们</NuxtLink></div>
      <div>
        <NuxtLink to="/product">产品</NuxtLink>
      </div>

      <div><NuxtLink to="/info">嵌套路由</NuxtLink></div>
    </div>
    <hr />
  </NuxtLayout>
</template>
<script setup>
import { reactive, onMounted, watch } from 'vue'
import { indexData } from '~/utils/mock'
const state = reactive({
  indexData,
})

const router = useRouter()
const scrollTo = (index) => {
  navigateTo(`/${index}`)
}
</script>

<style lang='scss' scoped>
// @import url(); 引入公共css类
</style>